package team.seekers.hula.course.courseUser.mapper;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import team.seekers.hula.course.courseUser.entity.dao.CourseUserDO;
import team.seekers.hula.course.courseUser.entity.vo.CourseUserManageListVO;

public interface CourseUserMapper extends BaseMapper<CourseUserDO> {

    String pageSql = "select u.id,cu.course_id,u.nickname,u.gmt_create,u.tel,cu.role from course_user cu " +
            "left join user u " +
            "on u.id = cu.user_id ${ew.customSqlSegment}";

    @Select(pageSql)
    Page<CourseUserManageListVO> page(Page page, @Param("ew") Wrapper queryWrapper);

}
